package cn.lkk.samples.lang.fundamental.Operators;

/**
 * Created by lkk on 2015/5/11.
 */
public class BasicOperator {

    public static void main(String[] main) {

        int x = 5;

        // 加减乘除
        x = x + 1;
        x = x - 2;
        x = x * 3;
        x = x / 4;


        x = 5;
        // 合并二元运算符
        x += 1;
        x -= 2;
        x *= 3;
        x /= 4;

        // 取模运算符
        x = 10 % 3;
        System.out.println(String.format("10%3" + x));

    }
}
